<template>
  <TbTitle title="三、本年度接受捐赠资助情况和使用情况（单位：人民币元）" />
  <table border="0" class="m-table-pdf">
    <tr>
      <td>项目</td>
      <td>现金</td>
      <td>非现金折合</td>
      <td width="100px">合计</td>
    </tr>

    <template v-for="(item, index) in detailInfo">
      <tr v-if="index == 7">
        <td style="width: 40%;text-align: left;padding-left:30px;">{{ item.assetTermName }}</td>
        <td colspan="3">{{ item.purpose }}</td>
      </tr>
      <tr v-else>
        <td style="width: 40%;text-align: left;padding-left:30px;">{{ item.assetTermName }}</td>
        <td style="width: 20%;">{{ item.cash }}</td>
        <td style="width: 20%;">{{ item.cashConversion }}</td>
        <td style="width: 20%;">{{ item.donationCount }}</td>
      </tr>
    </template>
  </table>
</template>

<script setup lang="ts">
import { ref, inject } from 'vue'
import TbTitle from '@/views/yearCheck/components/TbTitle.vue'

let detailInfo = ref([])
const { getDetailInfo } = inject('getDetailInfo')

getDetailInfo(13).then(res => {
  detailInfo.value = res.data
})
</script>
<style lang="scss" scoped></style>
